﻿namespace LiSAClient.Core.Extensions
{
    using System;
    using System.Threading;
    using System.Threading.Tasks;
    
    public class BackgroundTask
    {
        /// <summary>
        /// Starts a task in a new thread
        /// </summary>
        /// <param name="backgroundAction">The task</param>
        public static void New(Action backgroundAction)
        {
            Task.Factory.StartNew(backgroundAction, CancellationToken.None,
                      TaskCreationOptions.None,
                      TaskScheduler.Default);
        }
    }
}
